package com.inifitness.admin.core.system.mapper;

import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.inifitness.admin.core.system.model.bo.RouteBO;
import com.inifitness.admin.core.system.model.entity.SysMenu;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 菜单持久接口层.
 *
 * @author sunjinfeng
 * @since 2024/04/18 11:00:00
 */

@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {

  List<RouteBO> listRoutes();

  /**
   * 获取角色权限集合
   *
   * @param roles 角色编码集合
   * @return 权限并集
   */
  Set<String> listRolePerms(@Param("roles") Set<String> roles);
}
